<?php
	include_once('function/func.php');
?>
			

<?php
	if($result){
		foreach($result as $r){
?>
<div class="one_products">
	<?php if($r->price_new != 0 && $r->promotion != 0):?>
    <div class="sale"></div>
    <?php endif;?>
	<div id="productImageWrapID_<?=$r->id?>">
		<a title="<?=$r->title?>" href="<?=PATH_URL.'san-pham/chi-tiet/'.$r->id.''?>"><img src="<?=PATH_URL.IMAGES_PRODUCTS.$r->image.''?>" width="150" height="187" /></a>
	</div>
	<p>
		<a title="<?=$r->title?>" href="<?=PATH_URL.'san-pham/chi-tiet/'.$r->id.''?>"><?=cutString($r->title,45,$type=' ...')?></a>
	</p>
	<?php if($r->price_new != 0 && $r->promotion != 0){?>
    <div class="price_sellers">
        <strike><?=number_format($r->price_old,0,',','.');?> vnđ</strike>
        <h4 class="price"><?=number_format($r->price_new,0,',','.');?> vnđ</h4>
    </div>
    <?php }else{?>
    <h4 class="price"><?=number_format($r->price_old,0,',','.');?> vnđ</h4>
    <?php }?>
	<div class="button custom_cart"><a href="#" id="featuredProduct_<?=$r->id?>" onclick="addCart(<?=$r->id?>); return false">Đặt hàng</a></div>
</div>
<?php }}?>
<div class="pagination"><?=$this->adminpagination->create_links();?></div>
